#ifndef __HTTPD_H__
#define __HTTPD_H__

typedef struct Server {
    ds_pool_s   *pool;  /* global memory pool for initial variables */
    Log *log;           /* gloabl log */
    
    Conn    *free_connections;  /* current available connection */
    int free_connection_n;      /* current count of  available connections */

    TimeEvent *timeEventHead;   /* Timer event List */
    long timeEventNextId;       /* current max Timer event ID */
    
    int serverfd;               /* Listen socket */
    int epfd;                   /* epoll fd */
    Conn    *connections;       /* connection list */
    Event   *read_events;       /* all the read events(pre alloc) */
    Event   *write_events;      /* all the write events(pre alloc) */
}Server;

Server * Init_Server();

#endif

